#include <stdlib.h>
#include <stdio.h>

int isOdd(int x)
{
  return x%2 == 1;
}

int filter(int tab[],int size, int (* test)(int))
{
  int i;
  for(i=0;i<size;i++)
  {
    if(test(tab[i]))
    {
      printf("tab[%d] = %d appartient\n",i,tab[i]);
    }
    else
    {
      printf("tab[%d] = %d n'appartient pas\n",i, tab[i]);
      tab[i]=0;
    }
  }
}

int main(int argc, char** argv)
{
  int tab[] = {1,2,3,6,5,4,5,8,9,6,5,4,5,6,6};

  filter(tab,15,isOdd);

  return 0;
}
